package com.medical.controller;

import com.medical.pojo.ItemizeUsage;
import com.medical.pojo.ItemizeUsageVO;
import com.medical.service.ItemizeUsageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("itemizeUsage")
public class ItemizeUsageController {

    @Autowired
    private ItemizeUsageService itemizeUsageService;

    /*
    * 查询所有信息
     */
    @RequestMapping("/findAll")
    public List<ItemizeUsage> findAll(@RequestBody ItemizeUsageVO itemizeUsageVO){
        return itemizeUsageService.findAll(itemizeUsageVO);
    }
    /*
    * 查询照明耗能的数据，返回一个String类型的数组
     */
    @RequestMapping("/findLightingUsage")
    public List<String> findLightingUsage(@RequestBody ItemizeUsageVO itemizeUsageVO){
        return itemizeUsageService.findLightingUsage(itemizeUsageVO);
    }
    /*
     * 查询空调耗能的数据，返回一个String类型的数组
     */
    @RequestMapping("/findConditioningUsage")
    public List<String> findConditioningUsage(@RequestBody ItemizeUsageVO itemizeUsageVO){
        return itemizeUsageService.findConditioningUsage(itemizeUsageVO);
    }
    /*
     * 查询动力耗能的数据，返回一个String类型的数组
     */
    @RequestMapping("/findPowerUsage")
    public List<String> findPowerUsage(@RequestBody ItemizeUsageVO itemizeUsageVO){
        return itemizeUsageService.findPowerUsage(itemizeUsageVO);
    }
    /*
     * 查询特殊耗能的数据，返回一个String类型的数组
     */
    @RequestMapping("/findSpecialUsage")
    public List<String> findSpecialUsage(@RequestBody ItemizeUsageVO itemizeUsageVO){
        return itemizeUsageService.findSpecialUsage(itemizeUsageVO);
    }
}
